ver = release

ifeq ($(ver), error_request)
CFLAGS ?= -g -D_REVICE_ERROR_REQUEST -Wall -O0
else ifeq ($(ver), error_data)
CFLAGS ?= -g -D_REVICE_ERROR_DATA -Wall -O0
else
CFLAGS ?= -Wall -O0
endif

objects = main.o communication.o

revice : $(objects)
	gcc $(objects) $(CFLAGS) -o revice

%.o : %.c
	gcc -c $^ $(CFLAGS) -o $@

clean :
	rm -r $(objects) revice